<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<style type="text/css">
            .record {
             padding: 10px;
             margin:  20px;
             border: dashed 2px;
            }

            a {
             text-decoration: none;
            }

            a:hover {
             color: green;
            }

            .linkout {
             text-decoration: none;
             color: gray;
            }

            .desc {
             color: teal;
            }

            .tag {
             padding: 5px;
             margin: 5px;
             background-color: #EEEEEE;
             background: #EEEEEE url(/test1/tag_green1.png) no-repeat scroll left bottom;
             color: gray;
            }
        </style>

<!-- Top menu -->

<div class="record">
    Manage
    → <a href="/test1/admin">Companies</a>
    → <a href="/test1/admin/category">Categories</a>
    → <a href="/test1/admin/tag">Tags</a>
    <br /><br />
    <a href="./admin/company/new">New Company</a>
</div>

<!-- Список компаній -->

<?php foreach ($this->companies as $companyObj):?>

    <div class="record">
        <strong>Company (ID# <?=$companyObj->getId()?>) :</strong>
        <a href=""><?=$companyObj->getCategory()->getText()?></a> →
        <a href=""><?=$companyObj->getName()?></a>
        
        (<a href="/test1/admin/company/edit/i/<?php echo $companyObj->getId(); ?>">edit</a> |
        <a href="/test1/admin/company/delete/i/<?php echo $companyObj->getId(); ?>">delete</a>) &nbsp;

        Level : <?=$companyObj->getLevel()?><br />

        <a href="<?=$companyObj->getSite()?>" class="linkout"><?=$companyObj->getSite()?></a>

        <br /><br />
        <strong>Телефон: </strong>
        <?php  echo ($companyObj->getTelefon() != '') ? $companyObj->getTelefon() : "Not defined"; ?>

        <br />
        <strong>Адреса: </strong>
        <?php  echo ($companyObj->getAdresa() != '') ? $companyObj->getAdresa() : "Not defined"; ?>

        <br /><br />
        <strong>Опис: </strong><br />
        <span class="desc"><?=$companyObj->getDesc()?></span>

        <!-- Tags -->

        <br /><br />
        <strong>Теги:</strong>
        <?php foreach ($companyObj->getTags() as $tagObj):?>
            
        <a href="" class="tag">
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <?=$tagObj->getText()?>
        </a>
            
        <?php endforeach;?>

        <br /><br />
        Created:&nbsp;&nbsp; <?=$companyObj->getCreated()?>
        <br />
        Updated:&nbsp; <?=$companyObj->getUpdated()?>
        
    </div>

<?php endforeach; ?>